package com.poker.repository;

import com.poker.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface UserRepository extends JpaRepository<User, String>, JpaSpecificationExecutor<User> {

    @Modifying
    @Query(value = "update User set userState = ?1 where id = ?2")
    void updateUserStateToNormal(String userState, String id);

    @Modifying
    @Query(value = "update User set verifyState = ?1 where id = ?2")
    void updateVerifyState(String verifyState, String id);

}
